home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / DRIVES.SWG / 0088_Locking Hard Drives.pas < prev    next >
Pascal/Delphi Source File  |  1995-03-03  |  770b  |  32 lines

  1. {
  2. : Is there a way that I can cut off all access to a hard drive in bp7.
  3. : I mean like a security program that if you don't enter the right Password
  4. : then it won't let you even read the HD... Is there a Dos function or
  5. : something?
  6.  
  7. From: martijn@arbor.gds.nl (M. Moeling)
  8. }
  9.  
  10. program x;
  11. {$M 1024,0,0} {only if you use the keep 0}
  12.  
  13. procedure kill_int_13h; interrupt;
  14.  
  15. begin
  16. end;
  17.  
  18. begin
  19.   if not(get_password) then   {funtion that will get the password}
  20.   begin
  21.      setintvec($13,@kill_int_13h);
  22.      keep 0;   {if you want to return to dos}
  23.   end;
  24. {
  25.   the rest of your program
  26. }
  27. end.
  28.  
  29. {
  30. int 13h is your hd interrupt. Dos uses functions of this int to manage you hd,
  31. now you tp procedure does the job and returns without doing anything.
  32. }